/* This file is part of the Pardus Economy Planner.

   The Pardus Economy Planner is free software: you can redistribute it
   and/or modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation, either version 3 of
   the License, or (at your option) any later version.

   The Pardus Economy Planner is distributed in the hope that it
   will be useful, but WITHOUT ANY WARRANTY; without even the implied
   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   See the GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with the Pardus Economy Planner.  If not, see
   <http://www.gnu.org/licenses/>.
*/

/// <reference path="./window.js" />

/*
Class: LoadingWindow
Static class that shows a loading window to the user.
*/
var LoadingWindow = {};

/*
Function: Init
Initializes the LoadingWindow class's inner UIWindow.
*/
LoadingWindow.Init = function()
{
  LoadingWindow.Window = new UIWindow({
    name: "LoadingWindow",
    caption: "Loading",
    content: "<img src='Images/LoadingBar.gif'><br /><span style='font-size: 150%; text-align: center;'>Loading...</span>",
    modal: true,
    closeButton: false
  });
}
/*
Function: Show
Shows the Loading Window.
*/
LoadingWindow.Show = function()
{
  if (!LoadingWindow.Window)
    LoadingWindow.Init();
    
  LoadingWindow.Window.show();
}
/*
Function: Hide
Hides the Loading Window.
*/
LoadingWindow.Hide = function()
{
  LoadingWindow.Window.hide();
}